/**
 * 
 */
package de.cbf.cam.dsa.model.entities.weapon;

import java.beans.PropertyChangeSupport;

import javax.persistence.Transient;

import de.cbf.cam.dsa.model.entities.WeaponStyle;
import de.cbf.cam.dsa.model.persistence.Header;

/**
 * @author Nebelritter
 *
 */
public class WeaponRangedInUse extends Header implements WeaponInUse{
	/**
	 * @uml.property  name="weapon"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	protected WeaponRanged 	weapon;
	/**
	 * @uml.property  name="style"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	protected WeaponStyle 	style;
	
	
	public static final String PROPERTYNAME ="WeaponRanged";
	/**
	 * @uml.property  name="propertyChangeSupport"
	 */
	public PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
	/**
	 * @param style
	 */
	public WeaponRangedInUse(WeaponRanged weapon,WeaponStyle style) {
		super();
		this.style	= style;
		this.weapon = weapon;
	}

	/**
	 * @return
	 * @uml.property  name="propertyChangeSupport"
	 */
	@Override
	public PropertyChangeSupport getPropertyChangeSupport() {
		return propertyChangeSupport;
	}

	@Override
	@Transient
	public WeaponStyle getActiveStyle() {
		return null;
	}
	@Override
	public int getATtack() {	
		return 0;
	}
	@Override
	public String getGuid() {
		return guid;
	}

	@Override
	protected void setGuid(String guid) {
		this.guid = guid;		
	}

	@Override
	public OneWeapon getWeapon() {
		return weapon;
	}

	@Override
	public boolean isSameAs(WeaponInUse weaponInUse) {
		return weapon.equals(weaponInUse.getWeapon());
	}

	

	
}
